<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		.ad{
			position: fixed;
			left: 0;
			top: 50%;
			margin-top: -190px;
		}
		.ad span{
			position: absolute;
			left: 0;
			top: 0;
			font-size: 30px;
			cursor:pointer;
		}
		.ad_right{

			right: 0;
			left: auto;
		}
	</style>
	<script type="text/javascript" src='https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js'></script>
	<script type="text/javascript">
		$(function(){
			$('.ad span').click(function(){
					// $(this).parent().hide();
					// $('.ad_right').hide();
					$('.ad').hide();//广告隐藏
			});
		})
	</script>
</head>
<body>
	<img src='img/8.jpg' />
	<div class="ad">
		<a href=""><img src='img/2.png'/></a>
		<span>&times;11111111</span>
	</div>
	<div class="ad ad_right">
		<a href=""><img src='img/2.png'/></a>
		<span>&times;2222222222</span>
	</div>
</body>
</html>